package com.feng.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
*@Author 丰建立
*@Date 2017/9/19 12:35
*/
public class PatternUtil {
    private static final String URI_REG = "(/web/.+)|(/xxt)";

    public static final String plateNo ="车牌";
    public static final String bussiNo ="商业.*单";
    public static final String compulsoryNo ="交强.*单";
    public static final String bussiAmount ="(商业险$)|(车损险保额)";
    public static final String compulsoryAmount ="(交强险$)";
    public static final String bussiDate ="(起效日期)|(商业险起期)";
    public static final String compulsoryDate ="交强.*起期";

    public static boolean pass(String text,String patternStr){
        Pattern pattern = Pattern.compile(patternStr);
        Matcher matcher = pattern.matcher(text);
        return matcher.find();
    }

    public static void main(String[] args) {
        System.out.println(pass("商业单23789",bussiNo));
        System.out.println(pass("商业险起期",bussiAmount));
    }

}
